Graphics system interface

ABSTRACT

An interface for a graphics system includes simple yet powerful constructs that are easy for an application programmer to use and learn. Features include a unique vertex representation allowing the graphics pipeline to retain vertex state information and to mix indexed and direct vertex values and attributes; a projection matrix value set command; a display list call object command; and an embedded frame buffer clear/set command.

CROSS-REFERENCE TO RELATED APPLICATIONS

See the following copending patent applications incorporated herein byreference:

application Ser. No. 09/465,754, filed Dec. 17, 1999 of Moore et al.entitled “Vertex Cache For 3D Computer Graphics”; claiming benefit fromprovisional application No. 60/161,915, filed Oct. 28, 1999,

application Ser. No. 09/726,215, filed Nov. 28, 2000, of Fouladi et al.entitled “Method and Apparatus for Buffering Graphics Data in a GraphicsSystem” claiming benefit from provisional application No. 60/226,912filed Aug. 23, 2000;

application Ser. No. 09/722,367, filed Nov. 28, 2000, of Drebin et al.entitled “Recirculating Shade Tree Blender For A Graphics System”claiming benefit from provisional application No. 60/226,888, filed Aug.23, 2000;

application Ser. No. 09/722,663, filed Nov. 28, 2000, of Fouladi et al.entitled “Graphics System With Copy Out Conversions Between EmbeddedFrame Buffer And Main Memory” claiming benefit from provisionalapplication No. 60/227,030, filed Aug. 23, 2000;

application Ser. No. 09/722,390, filed Nov. 28, 2000, of Demers,entitled “Low Cost Graphics System With Stitching Hardware Support ForSkeletal Animation” claiming benefit from provisional application No.60/226,914, filed Aug. 23, 2000;

Application Ser. No. 09/726,216, filed Nov. 28, 2000, of Drebin et al.,entitled “Achromatic Lighting in a Graphics System and Method” claimingbenefit from provisional application No. 60/227,007, filed Aug. 23,2000.

FIELD OF THE INVENTION

The present invention relates to computer graphics, and moreparticularly to interactive graphics systems including but not limitedto home video game platforms. Still more particularly this inventionrelates to an advantageous software programming interface includingbinary command functions for controlling a graphics chip and to methodsfor generating, storing and decoding same.

BACKGROUND AND SUMMARY OF THE INVENTION

Many of us have seen films containing remarkably realistic dinosaurs,aliens, animated toys and other fanciful creatures. Such animations aremade possible by computer graphics. Using such techniques, a computergraphics artist can specify how each object should look and how itshould change in appearance over time, and a computer then models theobjects and displays them on a display such as your television or acomputer screen. The computer takes care of performing the many tasksrequired to make sure that each part of the displayed image is coloredand shaped just right based on the position and orientation of eachobject in a scene, the direction in which light seems to strike eachobject, the surface texture of each object, and other factors.

Because computer graphics generation is complex, computer-generatedthree-dimensional graphics just a few years ago were mostly limited toexpensive specialized flight simulators, high-end graphics workstationsand supercomputers. The public saw some of the images generated by thesecomputer systems in movies and expensive television advertisements, butmost of us couldn't actually interact with the computers doing thegraphics generation. All this has changed with the availability ofrelatively inexpensive 3D graphics platforms such as, for example, theNintendo 64® and various 3D graphics cards now available for personalcomputers. It is now possible to interact with exciting 3D animationsand simulations on relatively inexpensive computer graphics systems inyour home or office.

A problem graphics system designers confronted in the past was how toprovide a control interface for a graphics system that enables fast,efficient and flexible use of the graphics system by applicationsdesigned to be executed thereon. Various application programminginterfaces (APIs) and application binary interfaces (ABIs) have beendeveloped in the past for the purpose of enabling graphics applicationprogrammers to control the operation of a graphics chip provided in agraphics system. Perhaps the most commonly-used 3D graphics applicationprogramming interfaces in current use are Microsoft's Direct3D interfaceand the OpenGL interface developed through cooperation with SiliconGraphics. See, for example, Kovach, Inside Direct3D: The DefinitiveGuide to Real-Time 3D Power and Performance for Microsoft Windows(Microsoft Press 2000); and Neider et al., OpenGL Programming Guide: TheOfficial Guide to Learning OpenGL Release 1 (Addison-Wesley PublishingCo. 1993).

As explained in the Kovach book, Microsoft's DirectX applicationprogramming interface (API) provides a set of interfaces offeringefficient control of multimedia hardware on a computer running MicrosoftWindows. Kovach states that DirectX lets programmers work with commandsand data structures that are very close to those that the hardware cannatively process, without being so low level that code has to be writtendifferently for each device. By writing device-independent code,programmers can create software that will theoretically always performat its best (according to Kovach)—even as users enhance their systemswith new and improved 3D graphics accelerators, sound cards, inputdevices and other system capabilities.

Kovach explains that the device-independence of DirectX is obtainedbecause the DirectX APIs are built on a hardware abstraction layer (HAL)that hides the device-specific dependencies of the hardware. In fact,DirectX defines some hardware acceleration support features that aren'tavailable on much of the hardware built today in order to provideextensibility for the future.

While the DirectX approach has been widely adopted and is successful inproviding compatibility across a wide range of different platformconfigurations, the use of a thick hardware abstraction layer andassociated hardware emulation layer is not particularly suitable forcurrent low cost dedicated video game platforms at the current time. TheDirectX API was primarily designed for personal computers costing manyhundreds or thousands of dollars and manufactured in a variety ofdifferent configurations and permutations. While the DirectX API hasbeen successful in providing compatibility across a wide range of suchdifferent platform configurations, this compatibility has come at theexpense of efficiency and performance. In the context of a dedicatedlow-cost video game platform, it is possible to do much better in termsof providing a fully capable programming interface that is very close tothe hardware while providing a highly capable and flexible interface forachieving a wide variety of interesting 3-dimensional graphics effects.

One prior approach is described in U.S. patent application Ser. No.08/990,133 filed Dec. 12, 1997 by Van Hook et al., entitled “InterfaceFor A High Performance Low Cost Video Game System With CoprocessorProviding High Speed Efficient 3D Graphics And Digital Audio SignalProcessing. ” However, further improvements are possible and desirable.In particular, some people criticized the interface described in thisprior Van Hook et al., patent application because they thought it wasdifficult to write applications to. In the home video game arena, it isdesirable to maximize performance while keeping the interface used toinvoke and control such performance and capabilities as simple and easyto use as possible. Requiring application programmers to write to anunduly complicated interface may increase the time it takes to developsuch applications. This can have devastatingly negative effects when itcomes time to launch a new video game platform—since the success of theplatform may often depend on achieving a certain “critical mass” interms of the number of games or other applications available at launchtime. As some developers of prior new home video game platforms foundout, no one wants to buy a new video game system if there are no gamesto play on it. It is therefore desirable to provide a graphicsprogramming interface that is simple and easy to use and yet is verypowerful and flexible.

The present invention solves this problem by providing new and improvedinterface for graphics systems that is designed to be as thin aspossible in order to achieve high performance, while also providing alogical and orthogonal view of the graphics hardware.

The present invention provides a graphics system programming interfacewith graphics commands allowing geometry to be rendered with manyattributes. The interface provides two main methods for drawinggeometry. An immediate mode allows the command stream source to send astream of graphics commands directly to the graphics processor forconsumption. This immediate mode interface is useful when the mainprocessor must synthesize geometry data from a higher-level description(e.g., a height field or Bezier patch). The second method feeds acommand stream to the graphics processor using a memory-resident displaylist format. This interface provides superior performance for staticdata. The immediate interface and the display list interface bothsupport configurable vertex representations. The configurable vertexrepresentations include, for example, direct or indexed vertexcomponents. Vertex components (e.g., position, normal, color and texturecoordinates for a number of textures) can all be indexed independentlyfrom arrays, or placed directly in the command stream. Additionalflexibility is provided by allowing each vertex component to have adifferently-sized representation and precision. The available directtypes may include, for example, 8-bit signed and unsigned integer,16-bit signed and unsigned integer, and 32-bit floating point. A scaleis available to position the decimal point for the integer types. Theindirect types (e.g., 8-bit index or 16-bit index) can be used to indexinto an array of any of the direct types. This flexible representationallows the game developer to organize vertex data in a way that isappropriate for the game. The ability to index each component separatelyeliminates a great deal of data duplication.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features and advantages provided by the invention willbe better and more completely understood by referring to the followingdetailed description of presently preferred embodiments in conjunctionwith the drawings, of which:

FIG. 1 is an overall view of an example interactive computer graphicssystem;

FIG. 2 is a block diagram of the FIG. 1 example computer graphicssystem;

FIG. 3 is a block diagram of the example graphics and audio processorshown in FIG. 2;

FIG. 4 is a block diagram of the example 3D graphics processor shown inFIG. 3;

FIG. 5 is an example logical flow diagram of the FIG. 4 3D graphicsprocessor;

FIG. 6 is a general flow chart of functions performed by an exampleapplication for the FIG. 1 graphics system;

FIG. 7 is a flow chart showing the functions of FIG. 6 in more detail;

FIG. 8 shows example simple graphics command stream;

FIG. 9 shows an example binary level interface for setting the embeddedcolor and depth buffer of the FIG. 1 system to a particular (e.g.,initial) value;

FIG. 9A shows example pixel engine copy clear register formats;

FIG. 10 shows an example vertex data structure hierarchy includingexample description information;

FIG. 11 shows an example binary level interface defining a vertexattribute array;

FIG. 12 shows an example binary level interface defining a vertexdescriptor;

FIGS. 13A and 13B together show an example binary level interfacedefining a vertex attribute table;

FIG. 14 schematically illustrates an example vertex attribute formattable;

FIG. 15 shows example graphics primitives that may be represented usingthe vertex data structures herein;

FIG. 16 shows an example binary level interface defining a projectionmatrix;

FIG. 17 shows an example binary level interface defining a display listto be called; and

FIGS. 18A and 18B show example alternative compatible implementations.

DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS OF THE INVENTION

FIG. 1 shows an example interactive 3D computer graphics system 50.System 50 can be used to play interactive 3D video games withinteresting stereo sound. It can also be used for a variety of otherapplications.

In this example, system 50 is capable of processing, interactively inreal time, a digital representation or model of a three-dimensionalworld. System 50 can display some or all of the world from any arbitraryviewpoint. For example, system 50 can interactively change the viewpointin response to real time inputs from handheld controllers 52 a, 52 b orother input devices. This allows the game player to see the worldthrough the eyes of someone within or outside of the world. System 50can be used for applications that do not require real time 3Dinteractive display (e.g., 2D display generation and/or non-interactivedisplay), but the capability of displaying quality 3D images veryquickly can be used to create very realistic and exciting game play orother graphical interactions.

To play a video game or other application using system 50, the userfirst connects a main unit 54 to his or her color television set 56 orother display device by connecting a cable 58 between the two. Main unit54 produces both video signals and audio signals for controlling colortelevision set 56. The video signals are what controls the imagesdisplayed on the television screen 59, and the audio signals are playedback as sound through television stereo loudspeakers 61L, 61R.

The user also needs to connect main unit 54 to a power source. Thispower source may be a conventional AC adapter (not shown) that plugsinto a standard home electrical wall socket and converts the housecurrent into a lower DC voltage signal suitable for powering the mainunit 54. Batteries could be used in other implementations.

The user may use hand controllers 52 a, 52 b to control main unit 54.Controls 60 can be used, for example, to specify the direction (up ordown, left or right, closer or further away) that a character displayedon television 56 should move within a 3D world. Controls 60 also provideinput for other applications (e.g., menu selection, pointer/cursorcontrol, etc.). Controllers 52 can take a variety of forms. In thisexample, controllers 52 shown each include controls 60 such asjoysticks, push buttons and/or directional switches. Controllers 52 maybe connected to main unit 54 by cables or wirelessly via electromagnetic(e.g., radio or infrared) waves.

To play an application such as a game, the user selects an appropriatestorage medium 62 storing the video game or other application he or shewants to play, and inserts that storage medium into a slot 64 in mainunit 54. Storage medium 62 may, for example, be a specially encodedand/or encrypted optical and/or magnetic disk that stores commands forgraphics and audio processor 114 and/or instructions controlling mainprocessor 110 to develop such commands. The user may operate a powerswitch 66 to turn on main unit 54 and cause the main unit to beginrunning the video game or other application based on the software storedin the storage medium 62. The user may operate controllers 52 to provideinputs to main unit 54. For example, operating a control 60 may causethe game or other application to start. Moving other controls 60 cancause animated characters to move in different directions or change theuser's point of view in a 3D world. Depending upon the particularsoftware stored within the storage medium 62, the various controls 60 onthe controller 52 can perform different functions at different times.

Example Electronics of Overall System

FIG. 2 shows a block diagram of example components of system 50. Theprimary components include:

a main processor (CPU) 110,

a main memory 112, and

a graphics and audio processor 114.

In this example, main processor 110 (e.g., an enhanced IBM Power PC 750)receives inputs from handheld controllers 108 (and/or other inputdevices) via graphics and audio processor 114. Main processor 110interactively responds to user inputs, and executes a video game orother program supplied, for example, by external storage media 62 via amass storage access device 106 such as an optical disk drive. As oneexample, in the context of video game play, main processor 110 canperform collision detection and animation processing in addition to avariety of interactive and control functions.

In this example, main processor 110 generates 3D graphics and audiocommands and sends them to graphics and audio processor 114. Thegraphics and audio processor 114 processes these commands to generateinteresting visual images on display 59 and interesting stereo sound onstereo loudspeakers 61R, 61L or other suitable sound-generating devices.

Example system 50 includes a video encoder 120 that receives imagesignals from graphics and audio processor 114 and converts the imagesignals into analog and/or digital video signals suitable for display ona standard display device such as a computer monitor or home colortelevision set 56. System 100 also includes an audio codec(compressor/decompressor) 122 that compresses and decompresses digitizedaudio signals and may also convert between digital and analog audiosignaling formats as needed. Audio codec 122 can receive audio inputsvia a buffer 124 and provide them to graphics and audio processor 114for processing (e.g., mixing with other audio signals the processorgenerates and/or receives via a streaming audio output of mass storageaccess device 106). Graphics and audio processor 114 in this example canstore audio related information in an audio memory 126 that is availablefor audio tasks. Graphics and audio processor 114 provides the resultingaudio output signals to audio codec 122 for decompression and conversionto analog signals (e.g., via buffer amplifiers 128L, 128R) so they canbe reproduced by loudspeakers 61L, 61R.

Graphics and audio processor 114 has the ability to communicate withvarious additional devices that may be present within system 100. Forexample, a parallel digital bus 130 may be used to communicate with massstorage access device 106 and/or other components. A serial peripheralbus 132 may communicate with a variety of peripheral or other devicesincluding, for example:

a programmable read-only memory and/or real time clock 134,

a modem 136 or other networking interface (which may in turn connectsystem 100 to a telecommunications network 138 such as the Internet orother digital network from/to which program instructions and/or data canbe downloaded or uploaded), and

flash memory 140.

A further external serial bus 142 may be used to communicate withadditional expansion memory 144 (e.g., a memory card) or other devices.Connectors may be used to connect various devices to busses 130, 132,142.

Example Graphics And Audio Processor

FIG. 3 is a block diagram of an example graphics and audio processor114. Graphics and audio processor 114 in one example may be asingle-chip ASIC (application specific integrated circuit). In thisexample, graphics and audio processor 114 includes:

a processor interface 150,

a memory interface/controller 152,

a 3D graphics processor 154,

an audio digital signal processor (DSP) 156,

an audio memory interface 158,

an audio interface and mixer 160,

a peripheral controller 162, and

a display controller 164.

3D graphics processor 154 performs graphics processing tasks. Audiodigital signal processor 156 performs audio processing tasks. Displaycontroller 164 accesses image information from main memory 112 andprovides it to video encoder 120 for display on display device 102.Audio interface and mixer 160 interfaces with audio codec 122, and canalso mix audio from different sources (e.g., streaming audio from massstorage access device 106, the output of audio DSP 156, and externalaudio input received via audio codec 122). Processor interface 150provides a data and control interface between main processor 110 andgraphics and audio processor 114.

Memory interface 152 provides a data and control interface betweengraphics and audio processor 114 and memory 112. In this example, mainprocessor 110 accesses main memory 112 via processor interface 150 andmemory interface 152 that are part of graphics and audio processor 114.Peripheral controller 162 provides a data and control interface betweengraphics and audio processor 114 and the various peripherals mentionedabove. Audio memory interface 158 provides an interface with audiomemory 126.

Example Graphics Pipeline

FIG. 4 shows a more detailed view of an example 3D graphics processor154. 3D graphics processor 154 includes, among other things, a commandprocessor 200 and a 3D graphics pipeline 180. Main processor 110communicates streams of data (e.g., graphics command streams and displaylists) to command processor 200. Main processor 110 has a two-levelcache 112 to minimize memory latency, and also has a write-gatheringbuffer 111 for uncached data streams targeted for the graphics and audioprocessor 114. The write-gathering buffer 111 collects partial cachelines into full cache lines and sends the data out to the graphics andaudio processor 114 one cache line at a time for maximum bus usage.

Command processor 200 receives display commands in binary format frommain processor 110 and parses and decodes them—obtaining any additionaldata necessary to process them from shared memory 112. The commandprocessor 200 provides a stream of vertex commands to graphics pipeline180 for 2D and/or 3D processing and rendering. Graphics pipeline 180generates images based on these commands. The resulting imageinformation may be transferred to main memory 112 for access by displaycontroller/video interface unit 164—which displays the frame bufferoutput of pipeline 180 on display 102.

FIG. 5 is a logical flow diagram of graphics processor 154. Mainprocessor 110 may store graphics command streams 210, display lists 212and vertex arrays 214 in main memory 112, and pass pointers to commandprocessor 200 via bus interface 150. The main processor 110 storesgraphics commands in one or more graphics first-in-first-out (FIFO)buffers 210 it allocates in main memory 110 or elsewhere. The commandprocessor 200 fetches:

command streams from main memory 112 via an on-chip FIFO memory buffer216 that receives and buffers the graphics commands forsynchronization/flow control and load balancing,

display lists 212 from main memory 112 via an on-chip call FIFO memorybuffer 218, and

vertex attributes from the command stream and/or from vertex arrays 1000in main memory 112 via a vertex cache 220.

Command processor 200 performs command processing operations 200 a thatconvert attribute types to floating point format, and passes theresulting complete vertex polygon data to graphics pipeline 180 forrendering/rasterization. A programmable memory arbitration circuitry 130(see FIG. 4) arbitrates access to shared main memory 112 betweengraphics pipeline 180, command processor 200 and displaycontroller/video interface unit 164.

FIG. 4 shows that graphics pipeline 180 may include:

a transform unit 300,

a setup/rasterizer 400,

a texture unit 500,

a texture environment unit 600, and

a pixel engine 700.

Transform unit 300 performs a variety of 2D and 3D transform and otheroperations 300 a (see FIG. 5). Transform unit 300 may include one ormore matrix memories 300 b for storing matrices used in transformationprocessing 300 a. Transform unit 300 transforms incoming geometry pervertex from object space to screen space; and transforms incomingtexture coordinates and computes projective texture coordinates (300 c).Transform unit 300 may also perform polygon clipping/culling 300 d.Lighting processing 300 e also performed by transform unit 300 bprovides per vertex lighting computations for up to eight independentlights in one example embodiment. Transform unit 300 can also performtexture coordinate generation (300 c) for embossed type bump mappingeffects, as well as polygon clipping/culling operations (300 d).

Setup/rasterizer 400 includes a setup unit which receives vertex datafrom transform unit 300 and sends triangle setup information to one ormore rasterizer units (400 b) performing edge rasterization, texturecoordinate rasterization and color rasterization.

Texture unit 500 (which may include an on-chip texture memory (TMEM)502) performs various tasks related to texturing including for example:

retrieving textures 504 from main memory 112,

texture processing (500 a) including, for example, multi-texturehandling, post-cache texture decompression, texture filtering,embossing, shadows and lighting through the use of projective textures,and BLIT with alpha transparency and depth,

bump map processing for computing texture coordinate displacements forbump mapping, pseudo texture and texture tiling effects (500 b), and

indirect texture processing (500 c).

Texture unit 500 outputs filtered texture values to the textureenvironment unit 600 for texture environment processing (600 a). Textureenvironment unit 600 blends polygon and texture color/alpha/depth, andcan also perform texture fog processing (600 b) to achieve inverse rangebased fog effects. Texture environment unit 600 can provide multiplestages to perform a variety of other interesting environment-relatedfunctions based for example on color/alpha modulation, embossing, detailtexturing, texture swapping, clamping, and depth blending..

Pixel engine 700 performs depth (z) compare (700 a) and pixel blending(700 b). In this example, pixel engine 700 stores data into an embedded(on-chip) frame buffer memory 702. Graphics pipeline 180 may include oneor more embedded DRAM memories 702 to store frame buffer and/or textureinformation locally. Z compares 700 a′ can also be performed at anearlier stage in the graphics pipeline 180 depending on the renderingmode currently in effect (e.g., z compares can be performed earlier ifalpha blending is not required). The pixel engine 700 includes a copyoperation 700 c that periodically writes on-chip frame buffer 702 tomain memory 112 for access by display/video interface unit 164. Thiscopy operation 700 c can also be used to copy embedded frame buffer 702contents to textures in the main memory 112 for dynamic texturesynthesis effects. Anti-aliasing and other filtering can be performedduring the copy-out operation. The frame buffer output of graphicspipeline 180 (which is ultimately stored in main memory 112) is readeach frame by display/video interface unit 164. Display controller/videointerface 164 provides digital RGB pixel values for display on display102.

Example Graphics System Application Interface

As described above, main processor 110 sends graphics commands tographics and audio processor 114. These graphics commands tell thegraphics and audio processor 114 what to do. For example, the graphicscommands can tell the graphics and audio processor 114 to draw aparticular image onto display device 56. Commands might also tell thegraphics and audio processor 114 to produce a particular sound foroutput by loudspeakers 61. Still other commands might tell the graphicsand audio processor 114 to perform so-called “housekeeping” commandsand/or to set up a particular state in preparation for a subsequent“action” command.

In the example embodiment, the commands that main processor 110 sends tographics and audio processor 114 can come from a number of sources. Onesource of commands is the main processor 110 itself. Under control ofprogram instructions provided, for example, by mass storage accessdevice 106 and/or boot ROM 134, main processor 110 can dynamicallycreate or generate graphics commands under program control to send tographics and audio processor 114. Main processor 110 can create and sendgraphics and audio processor 114 any command that the graphics and audioprocessor understands. Graphics and audio processor 114 will act on thecommands and perform the action requested by the command.

Another source of graphics commands for graphics and audio processor 114is mass storage access device 106. It takes some time for main processor110 to dynamically create graphics commands. When system 50 is animatinga scene in response to real-time inputs from hand controllers 52 or thelike, there may be no alternative other than for main processor 110 todynamically create the graphics commands telling the graphics and audioprocessor 114 to draw a particular cartoon or other character in aparticular position. That way, as the user operates hand controllers 52of system 50 responds to other input devices, main processor 110 candynamically adjust or animate the displayed scene in response to thosereal-time inputs to provide interactive animation. Such fan and excitinginteractive animation is generally provided by main processor 110dynamically creating graphics commands “on the fly. ”

Sometimes, however, some part of a scene to be displayed is relativelystatic and does not change in response to real-time inputs. For example,a complicated 3D world background such as a castle, a mountain fortress,a landscape or an undersea world may not change much or at all asanimated characters move through the world. In such cases, it ispossible to use an offline authoring computer to develop the complexseries of graphics commands required to draw the particular scene orportion of the scene and store them in a preconstructed display list.Similarly, sound effects, music and other sounds can be pre-generatedoff-line by a sound authoring system. The resulting display list(s)and/or audio list(s) can be stored on an optical disk 62 or other massstorage device. When it comes time to draw the scene and/or play thesound, the associated display list(s) and/or audio list(s) can simply beread from the mass storage device 62 and stored into main memory 112.Main processor 110 may then, under program control, tell the graphicsand audio processor 114 where to find the preconstructed display list(s)and/or audio list(s), and instruct the graphics and audio processor toexecute the lists. In this way, main processor 110 does not have todevote its processing resources to develop complicated display listsand/or audio lists since that task is off-loaded to an off-lineauthoring system that pre-compiles the lists in preparation for use bythe graphics and audio processor 114. Such display lists can be storedby any storage device within system 50 or accessible to it, includingbut not limited to memory card 144, flash memory 140, boot ROM 134,audio memory 126, etc. The commands could be embedded in hardware suchas gate arrays or the like, and communicated to system 50 via any of theexternal interfaces such as bus 142, bus 132, handheld controller ports,parallel bus 130, infrared, etc.

Still another possibility is for commands intended for processing by thegraphics and audio processor 114 to arrive via a data communicationsconnection such as network 138. In one example, graphics commands, audiocommands and/or other commands intended to be processed by graphics andaudio processor 114 may arrive from a data communications network 138via modem 136. Such commands could be transmitted, for example, from aremote system 50 of the same configuration as that shown in FIG. 2 inorder to provide interactive multi-user remote game play. The commandscould originate from any other source including a personal computer, amini-computer or main frame computer, a data transmitter, or any otherdata source.

Irrespective of how commands intended for graphics and audio processor114 arrive and how they are stored before and/or after arrival, thefirst step in causing such commands to be processed by the graphics andaudio processor 114 is to make them available to the graphics and audioprocessor. In the example embodiment, making the commands available tographics and audio processor 114 can be accomplished either by havingmain processor 10 send the commands directly to the graphics and audioprocessor via a data bus in an immediate mode of command transfer, or bystoring the commands in some memory accessible to the graphics and audioprocessor 114 (e.g., main memory 112, audio memory 126, or any othermemory device to which the graphics and audio processor 114 is coupled)and informing the graphics and audio processor where to find thecommands and instructing it to begin processing those commands.

Graphics Command Stream

In the example embodiment, graphics and audio processor 114 may receiveregister and other commands from main processor 110 and/or some othersource (e.g., main memory 112) in the form of a graphics command stream.Generally, the data that is sent from main processor 110 to the graphicsand audio processor 114 can be called the “command stream. ” The commandstream holds drawing commands along with vertices and their attributesand mechanisms for loading registers and changing modes in the graphicspipeline 180. The stream of graphics commands are sent to the graphicsand audio processor 114 for processing in a generally sequential manner.Such stream commands can be provided in a so-called “immediate mode”directly from main processor 110 to the graphics and audio processor 114through a write gatherer arrangement (see FIG. 4) to provide veryefficient transfer of graphics and audio commands from the mainprocessor 110 to the graphics and audio processor 114. The graphicscommand stream can also be provided to graphics and audio processor 114via main memory 112 or other memory or other data communicationscapabilities within system 50. The cache/command processor 200 withinthe graphics and audio processor 114 performs tasks such as, forexample, fetching the command stream from main memory 112; fetchingvertex attributes (e.g., either from the command stream or from arraysin main memory); converting attribute types to appropriate formats(e.g., floating point); and transferring complete vertices to theremainder of the graphics pipeline 180 for processing.

As shown in FIG. 5, the command stream is fetched from thefirst-in-first-out buffer 210 (see also above-referenced ProvisionalApplication No. 60/226,912, filed Aug. 23, 2000 and its correspondingutility application Ser. No. 09/726,215, filed Nov. 28, 2000, bothentitled “Method and Apparatus for Buffering Graphics Data in a GraphicsSystem ”, and read into a FIFO buffer 216. The command processor 200strips and decodes the commands to decide the number of data associatedwith it. The data is then taken from the stream and/or fetched from anarray in main memory 112, based on an index value. The vertex attributesare converted to floating point data that can be consumed by thetransform engine 300.

The following are example command stream formats in the exampleembodiment:

TABLE I Opcode Opcode(7:0) Next Followed by NOP 00000000 none noneDraw_Quads 10000vat(2:0) VertexCount(15:0) Vertex attribute streamDraw_Triangles 10010vat(2:0) VertexCount(15:0) Vertex attribute streamDraw_Triangle_strip 10011vat(2:0) VertexCount(15:0) Vertex attributestream Draw_Triangle_fan 10100vat(2:0) VertexCount(15:0) Vertexattribute stream Draw_Lines 10101vat(2:0) VertexCount(15:0) Vertexattribute stream Draw_Line_strip 10110vat(2:0) VertexCount(15:0) Vertexattribute stream Draw_Points 10111vat(2:0) VertexCount(15:0) Vertexattribute stream CP_LoadRegs 00001xxx Address[7:0] 32 bits data (for CPonly registers) XF_LoadRegs 00010xxx none (N + 2)*32 bits (This is usedfor First 32 bit: loading all XF 15:00 register address in XF registers,including 19:16 number of 32 bit registers to be matrices. It can beloaded (N + 1, 0 means 1, 0xff means 16) used to load matrices 31:20unused with immediate data) Next N + 1 32 bits: 31:00 register dataXF_IndexLoadRegA 00100xxx none 32 bits (registers are in the 11:0register address in XF first 4K address space 15:12 number of 32 bitdata, (0 means 1, of the XF. It can be 0xff means 16) used to block loadmatrix and light 31:16 Index to the register Array A registers)XF_IndexLoadRegB 00101xxx none 32 bits (registers are in the 11:0register address in XF first 4K address space 15:12 number of 32 bitdata, (0 means 1, of the XF. It can be 0xff means 16) used to block load31:16 Index to the register Array B matrix and light registers)XF_IndexLoadRegC 00110xxx none 32 bits (registers are in the 11:0register address in XF first 4K address space 15:12 number of 32 bitdata, (0 means 1, of the XF. It can be 0xff means 16) used to block load31:16 Index to the register Array C matrix and light registers)XF_IndexLoadRegD 00111xxx none 32 bits (registers are in the 11:0register address in XF first 4K address space 15:12 number of 32 bitdata, (0 means 1, of the XF. It can be 0xff means 16) used to block load31:16 Index to the register Array D matrix and light registers)Call_Object 01000xxx none 2 × 32 25:5 address (need to be 32 byte align)25:5 count (32 byte count) V$_Invalidate 01001xxx none none SU_ByPassCmd0110,SUattr(3:0) none 32 bit data (This includes all the register loadbelow XF and all setup unit commands, which bypass XF)

As shown in Table I above, the graphics command stream can includeregister load commands. Register commands are, in general, commands thathave the effect of writing particular state information to particularregisters internal to the graphics and audio processor 114. The graphicsand audio processor 114 has a number of internal registers addressableby main processor 110. To change the state of the graphics and audioprocessor 114 in particular way, main processor 110 can write aparticular value to a particular register internal to the graphics andaudio processor 114. Register commands have the advantage of allowingthe graphics pipeline to retain drawing state information that mainprocessor 110 can selectively change by sending further register loadcommands.

For example, the vertices in a draw command can all share the samevertex attribute data structure defining a number of attributesassociated with a vertex. Sending all of the vertex attributeinformation before a draw command could be costly. It therefore may bedesirable to store most of the common vertex types in registers withinthe graphics and audio processor 114, and to simply pass an index to thestored table. These tables may not need to be updated each time a newdraw command is sent down, but may only need to be updated every once ina while. In the example embodiment, command processor 200 holds a vertexcommand descriptor register (VCD) and a eight-entry vertex attributetable (VAT) defining whether the attribute is present and if so whetherit is indexed or direct. A “load_VCD” register command is used to updatethe register whenever updating is necessary.

In certain situations, main processor 110 may also read the graphics andaudio processor 114 internal registers to determine the state of thegraphics and audio processor. For example, the main processor 110 canstart and stop the graphics and audio processor 114 and/or determine itsgeneral status by reading from and/or writing to internal registerswithin the graphics and audio processor. Main processor 110 can alsoload a number of graphics values (e.g., transformation matrices, pixelformats, vertex formats, etc.) by writing to registers within thegraphics and audio processor 114. As another example, main processor 110can write to a series of FIFO control registers within the graphics andaudio processor 114 that control where the graphics and audio processor114 obtains further commands for processing.

The following are example command registers used for definingtransformation matrices, vertex control data, vertex attribute tables,vertex arrays, vertex stride, and other state parameters:

TABLE II Register name Register address[7:0] Bit fields MatrixIndexA0011xxxx 5:0 index for position/normal matrix 11:6 index for tex0 matrix17:12 index for tex1 matrix 23:18 index for tex2 matrix 29:24 index fortex3 matrix MatrixIndexB 0100xxxx 5:0 index for tex4 matrix 11:6 indexfor tex5 matrix 17:12 index for tex6 matrix 23:18 index for tex7 matrixVCD_Lo 0101xxxx 16:00 VCD 12 to 0 0 PosMatIdx 1 Tex0MatIdx 2 TexlMatIdx3 Tex2atIdx 4 Tex3MatIdx 5 Tex4MatIdx 6 Tex5MatIdx 7 Tex6MatIdx 8Tex7MatIdx 10:9 Position 12:11 Normal 14:13 ColorDiffused 16:15ColorSpecular VCD_-Hi 0110xxxx 15:00 VCD 20 to 13 01:00 Tex0Coord 03:02Tex1Coord 05:04 Tex2Coord 07:06 Tex3Coord 09:08 Tex4Coord 11:10Tex5Coord 13:12 Tex6Coord 15:14 Tex7Coord VAT_group0 0111x,vat[2:0] 32bits 08:00 Position parameters 12:09 Normal parameters 16:13ColorDiffused parameters 20:17 ColorSpecular parameters 29:21 Tex0Coordparameters 30:30 ByteDequant 31:31 NormalIndex3 VAT_group11000x,vat[2:0] 32 bits 08:00 Tex1Coord parameters 17:09 Tex2Coordparameters 26:18 Tex3Coord parameters 30:27 Tex4Coord parameterssub-field[3:0] 31unused VAT_group2 1001x,vat[2:0] 32 bits 04:00Tex4Coord parameters sub-field[8:4] 13:05 Tex5Coord parameters 22:14Tex6Coord parameters 31:23 Tex7Coord parameters ArrayBase1010,array[3:0] 32 bit data 25:00 Base(25:0) array[3:0]: 31:26 unused0000 = attribute9 base register 0001 = attribute10 base register 0010 =attribute11 base register 0011 = attribute12 base register 0100 =attribute13 base register 0101 = atrribute14 base register 0110 =attribute15 base register 0111 = attribute16 base register 1000 =attribute17 base register 1001 = attribute18 base register 1010 =attribute19 base register 1011 = attribute20 base register 1100 =IndexRegA base register 1101 = IndexRegB base register 1110 = IndexRegCbase register 1111 = IndexkegD base register ArrayStride 1011,array[3:0]32 bit data 07:00 Stride(7:0) array[3:0]: 31:08 unused 0000 = attribute9stride register 0001 = attribute10 stride register 0010 = attribute11stride register 0011 = attribute12 stride register 0100 = attribute13stride register 0101 = attribute14 stride register 0110 = attribute15stride register 0111 = attribute16 stride register 1000 = attribute17stride register 1001 = attribute18 stride register 1010 = attribute19stride register 1011 = attribute20 stride register 1100 = IndexRegAstride register 1101 = IndexRegB stride register 1110 = IndexRegC strideregister 1111 = IndexRegD stride register

In the example embodiment, the command processor 200 converts thecommand stream to a vertex stream which it sends to transform unit 300for further processing. The vertex stream sent to the transform unit 300can change based on the current mode, but the data ordering per vertexis essentially the same and is fixed as shown in the following table:

TABLE III Location in stream (in words) Data Description 0 to 2 X, Y, Zin 32b SPFP Geometry information in single precision floating pointformat 3 to 5 Nx, Ny, Nz in 32b SPFP Normal vector 6 RGBA in 32b integer(8b/comp) Color0 per vertex (RGBA) 7 RGBA in 32b integer (8b/comp)Color1 per vertex (RGBA)  8 to 10 Tx, Ty, Tz in 32b SPFP Binormal vectorT 11 to 13 Bx, By, Bz in 32b SPFP Binormal vector B 14 to 15 S0, T0 in32b SPFP Texture 0 data 16 to 29 Sn, Tn in 32b SPFP Texture 1 to n data

The location of words in the stream is order dependent, but not exact.For example, if the per-vertex color is not supplied, then the firsttexture will start at word 6 instead of word 8. Texture comes aftercolor.

Example Graphics Application Processing Loop

FIG. 6 shows an example summary flow chart of steps that may beperformed by system 50 under control of an application such as a videogame program to develop graphics for display on the display 56. System50 is first booted from boot ROM 134 (block 610). During or after systemboot, main processor 110 and graphics and audio processor 114 areinitialized and the operating system is also initialized (block 612).System 50 is then ready to have its logic set up for a specificapplication, such as a videogame (block 614). The state of the graphicsand audio processor 114 is set by sending an appropriate graphicscommand stream to the graphics and audio processor (block 616). Thesystem 50 is then ready to process vertex information provided through afurther command stream describing a primitive in terms of vertex datastructure, and draw commands (block 618). Once the embedded frame buffer702 has a completed frame of data, further commands sent to the graphicsand audio processor 114 cause the processor to copy its embedded framebuffer to an external frame buffer 113 allocated in main memory 112(block 620). The video interface 164 is then used to display the imagedata in the external frame buffer on a display device (block 622). Oncea completed frame is copied from the embedded frame buffer, the systemis ready to begin processing the next frame, as indicated by the frameloop 624 in FIG. 6. FIG. 7 shows is greater detail some of the possiblegraphics commands that can be performed in connection with each of thevarious steps shown in FIG. 6.

Example Simple Graphics Command Stream

For purposes of illustration FIG. 8 shows an example simple graphicscommand stream drawing a single graphics primitive (e.g., a singletriangle) on display 56. In this example simple graphics command stream,the first set of graphics commands initializes the graphics pipeline 180(GXInit( )) (block 1002). When the graphics and audio processor 114comes out of hardware reset, its internal register values are undefinedand therefore need to be set by main processor 110 under control of bootROM 134 and/or the application program. A series of initializationcommands such as register load commands may be issued to set the stateof graphics and audio processor 114 to a known, pre-defined state thatis suitable for the particular application that is to be performed. Ofcourse, the application can reset any of these values to any otherdesired value on a dynamic basis. However, to save the application work,it may be desirable for boot ROM 134 to provide a series ofstate-setting graphics initialization commands that set up the graphicsand audio processor 114 so that it is operating in a known functioningdefault graphics mode.

One example initialization may be to clear (set) the internal embeddedframe buffer 702 to an all-black color value with z (distance) of thecorresponding embedded depth buffer being set to infinite distance ateach location. Such a “set copy clear” instruction effectively sets up aclean canvas onto which graphics and audio processor 114 can draw thenext image, and is re-formed during an embedded frame buffer copyoperation in the example embodiment. FIG. 9 shows an example binary datastream that may be sent to the graphics and audio processor 114 tocontrol it to clear (set) its internal frame buffer 113 to a black colorat each and every pixel location and to set the corresponding internaldepth buffer to infinite distance at every pixel. In the particularexample shown, such a command stream comprises three pixel engineregister load commands:

pixel engine copy clear (alpha red),

pixel engine copy clear (green blue),

pixel engine copy clear (z).

In this example, the first portion of each register load commandincludes a “cp_cmd_su_bypass” command string (0x6 1) (where “0x”indicates hexadecimal). As explained in Table I above, this commandstring provides access to registers within graphics pipeline 180 belowtransform unit 300. This string is followed by a pixel engine registerdesignation (0x4F in the case of a pixel engine copy clear alpha/redcommand), a 1-byte pad; and a 1-byte alpha value and a 1-byte red value(FF for black).

A similar format is used for the pe_copy_clear_green blue command exceptthat the last two bytes indicate the green and blue values (FF forblack), and a different pixel engine register designation (0x50) is usedfor the green/blue register values. Similarly, the pe_copy_clear_zcommand is issued by sending a cp_cmd_su bypass string (0x61) followedby a register designator 0x51 (designating a pixel engine z valueregister) followed by a 24-bit z (depth) value. The three set copy clearcommands shown n FIG. 9 could be issued in any order (e.g., set z copyclear or set green/blue copy clear could be issued first). See FIG. 9Awhich shows example register formats.

In response to receipt of the FIG. 9 commands, pixel engine 700 writesthe specified alpha, red, green, blue and z values into embedded framebuffer 702.

Referring once again to FIG. 8, a next step in preparing to display animage onto display 56 may be to define the various data structuresassociated with the vertices of the primitive to be drawn. The FIG. 10diagram shows, for purposes of illustration, example vertex and vertexattribute descriptors that can be used to describe vertices. In theexample embodiment, all vertices within a given primitive share the samevertex descriptor and vertex attribute format. The vertex descriptor inthe example embodiment describes which attributes are present in aparticular vertex format and how they are transmitted from the mainprocessor 110 (or other source) to the graphics processor 114 (e.g.,either direct or indexed). The vertex attribute format describes theformat (e.g., type, size, format, fixed point scale, etc.) of eachattribute in a particular vertex format. The vertex attribute formattogether with the vertex descriptor may be thought of as the overallvertex format.

The following is an example of a vertex attribute table (VAT) (see alsoabove-referenced application Ser. No. 09/465,754 filed Dec. 12, 1999entitled “Vertex Cache For 3D Computer Graphics” ) indexed by a drawcommand “vat” field, with each entry in the table specifyingcharacteristics for all of the thirteen attributes:

TABLE IV VERTEX ATTRIBUTE TABLE (VAT) Attribute Attribute number namebits Encoding 0 PosMatIdx 0 Position/normal matrix index. Always directif present 0: not present 1: present NOTE: position and normal matricesare stored in 2 separate RAMs in the Xform unit, but there is a one toone correspondence between normal and position index. If index “A” isused for the position, then index “A” needs to be used for the normal aswell. 1 Tex0MatIdx 1 TextCoord0 matrix index, always direct if present0: not present 1: present 2 Tex1MatIdx 2 TextCoord0 matrix index, alwaysdirect if present 0: not present 1: present 3 Tex2MatIdx 3 TextCoord0matrix index, always direct if present 0: not present 1: present 4Tex3MatIdx 4 TextCoord0 matrix index, always direct if present 0: notpresent 1: present 5 Tex4MatIdx 5 TextCoord0 matrix index, always directif present 0: not present 1: present 6 Tex5MatIdx 6 TextCoord0 matrixindex, always direct if present 0: not present 1: present 7 Tex6MatIdx 7TextCoord0 matrix index, always direct if present 0: not present 1:present 8 Tex7MatIdx 8 TextCoord0 matrix index, always direct if present0: not present 1: present 9 Position 10:9 00: reserved 10: 8 bit index01: direct 11:16 bit index 10 Normal 12:11 00: not present 10:8 bitindex 01: direct 11:16 bit index 11 Color0 14:13 00: not present 10:8bit index 01: direct 11:16 bit index 12 Color1 16:15 00: not present10:8 bit index 01: direct 11:16 bit index 13 Tex0Coord 18:17 00: notpresent 01: direct 10:8 bit index 11:16 bit index 14 Tex1Coord 20:19 00:not present 01: direct 10:8 bit index 11:16 bit index 15 Tex2Coord 22:2100: not present 01: direct 10:8 bit index 11:16 bit index 16 Tex3Coord24:23 00: not present 01: direct 10:8 bit index 11:16 bit index 17Tex4Coord 26:25 00: not present 01: direct 10:8 bit index 11:16 bitindex 18 Tex5Coord 28:27 Same as above 19 Tex6Coord 30:29 00: notpresent 01: direct 10:8 bit index 11:16 bit index 20 Tex7Coord 32:31 00:not present 01: direct 10:8 bit index 11:16 bit index

As described in application Ser. No. 09/465,754, as well as above,entries in the vertex descriptor information can be either direct orindexed. Indexed vertex attributes include an index to an array insteadof a value. The index may be an 8-bit or 16-bit pointer into an array ofattributes. In the example embodiment, there is one base addressregister per attribute in the command processor 200. The index is notsimply an offset into the array, but rather depends on a number offactors including, for example, the number of components in theattribute; the size of the component; padding between attributes foralignment purposes; and whether multiple attributes are interleaved inthe same array. To provide maximum flexibility, there is also an arraystride register for each attribute. The distance between two attributes(computed by software) is loaded into this register. Calculations areused to calculate the offset and to calculate the actual memory addressbased on an index value. An example address calculation is as follows:

Memory address=ArrayBase[I]+index*ArrayStride[I],

where I is the attribute number. In one particular implementation, theArrayBase value is a 26-bit byte address, and ArrayStride is an 8-bitvalue.

A vertex can have direct and indirect attributes intermixed. For shortvalues, it may be more efficient to send the actual value than a pointerto the value.

Any attribute in the example embodiment can be sent directly or as inindex into an array.

In general, the steps required to draw a primitive include describingwhich attributes are present in the vertex format (i.e., define thevertex attribute table); describing whether the attributes are indexedor referenced directly (i.e., define the vertex descriptor); for indexeddata, delivering a vertex array that can be referenced by array pointersand strides; describing the number of elements in each attribute andtheir type; describing the primitive type; and then, finally, drawingthe primitive by sending the graphics processor 114 draw command with astream of vertices that match the vertex description in attribute format(see FIG. 8, blocks 1004, 1006, 1008).

FIG. 11 shows an example “set array” command used to help define avertex format (see FIG. 8 block 1004, “Define and Align Vertex Arrays”).In the example embodiment, the example “set array” command sets thecommand processor array base register for a particular vertex array andalso sets the array stride register for the array. FIG. 11 showsparticular example binary bit patterns that may be used for thiscommand. In this example, to set an array base register, the graphicscommand stream may include:

an initial “0x08” value indicating “cp_cmd_load reg” (i.e., load acommand processor 200 register) followed by

a 2-byte value indicating which array base register is to be loaded,followed by

an additional 4-byte value providing an address to the array in memory.

In this particular example, the 2-byte value indicating which array baseregister is to be loaded has the format “0xAx”, where the byte “x”following the “A” value encodes a particular one of the attributes setforth in Table IV above. Note that some of the Table IV attributes(i.e., the matrix indices) are not included in the encoding in theexample embodiment. In the example embodiment, the 4-byte address inmemory is encoded by providing six initial bits of 0 padding followed bya 26-bit address. Setting the array stride register value is similarexcept that the third and fourth bytes indicate an array stride register(e.g., “0xBx” and the following value comprises four bytes containing aninitial 24-bit 0 padded value and an 8-bit stride value for the array.

Referring once again to FIG. 8, a further step preliminary to issuing adraw command may be to set up a vertex descriptor and a vertex attributetable (block 1006). FIG. 12 shows an example command stream used to seta vertex descriptor. In the example embodiment, setting a vertexdescriptor involves setting two associated register values (“vcd_lo”“vcd_hi”) within command processor 200 in order to specify theparticular vertex descriptor attributes associated with the primitive tobe displayed. FIG. 12 shows particular binary encodings used to tell thegraphics and audio processor 114 to load the vcd_lo and vcd_hi registers(e.g., “0x0850” for an example vcd_lo register and “0x0860” to specifyloading a cp_vcd_hi register). Values following each of these 4-bytecommands indicates particular vertex attribute values as shown in Table4 above, and as encoded in the particular binary bit patterns slotsshown in FIG. 12.

In more detail, the vertex descriptor stored in the VCD_lo VCD_hiregister includes at least one bit for each of the twenty attributesshown in Table IV, that bit generally indicating whether the attributeis provided directly or via an array. In the example embodiment, theVCD_lo register contains a 17-bit value, providing bit flags indicatingdirect or indexed for each of the first twelve attributes in Table IV.The particular bit encodings are shown in the last column of Table IV.Note that certain attribute encodings indicate whether or not theattribute is present (since the attribute is always direct if it ispresent), and certain other encodings span multiple bits and provideinformation as to the type of index if the attribute is indexed (e.g.,the “position” value may span two bits with a value “01” for direct,“10” for 8-bit index, and “11” for 16-bit index). Similarly, the VCD_hiregister contains bit fields corresponding to attributes 13-20 (i.e.,texture 0 coordinate through texture 7 coordinate) as shown in Table IVabove.

On a more abstract level, the GXSetVtxDesc command is used to indicatewhether an attribute is present in the vertex data, and whether it isindexed or direct. There is only one active vertex descriptor, known asthe current vertex descriptor. A GXSetVtxDesc command can be used to seta value of GX_NONE for all the attributes in the current vertexdescriptor to indicate that no data for this attribute will be presentin the vertex. Once the VCD registers are cleared, the application onlyneeds to describe attributes that it intends to provide. As shown inTable IV, possible attributes are:

Position, GX_VA_POS (this attribute is required for every vertexdescriptor).

Normal GX_VA_NRM, or normal/binormal/tangent, GX_VA_NBT.

Color_(—)0, GX_VA_CLR0.

Color_, GX_VA_CLR1.

Up to 8 texture coordinates, GX_VA_TEX0-7.

A position/normal matrix index, GX_VA_PNMTXIDX.

A texture matrix index, GX_VA_TEX0MTXIDX—GX_VA_TEX7MTXIDX.

The last two attributes listed are 8-bit indices which are used forreferencing a transformation matrix in the on-chip matrix memory. Thissupports simple skinning of a character, for example. These indices aredifferent from the other attributes in that they may only be sent asdirect data.

The graphics processor (GP) 114 assumes that the application will sendany attribute data you have specified in the ascending order shown inTable IV, that is:

Order Attribute

0 GX_VA_PNMTXIDX

1 GX_VA_TEX0MTXIDX

2 GX_VA_TEX1MTXIDX

3 GX_VA_TEX2MTXIDX

4 GX_VA_TEX3MTXIDX

5 GX_VA_TEX4MTXIDX

6 GX_VA_TEX5MTXIDX

7 GX_VA_TEX6MTXIDX

8 GX_VA_TEX7MTXIDX

9 GX_VA_POS

10 GX_VA_NRM or GX_VA_NBT

11 GX_VA_CLR0

12 GX_VA_CLR1

13 GX_VA_TEX0

14 GX_VA_TEX1

15 GX_VA_TEX2

16 GX_VA_TEX3

17 GX_VA_TEX4

18 GX_VA_TEX5

19 GX_VA_TEX6

20 GX_VA_TEX7

Texture coordinates are enabled sequentially, starting at GX_VA_TEX0

Describing Attribute Data Formats

FIGS. 13A and 13B show an example command stream for setting vertexattribute formats. The Vertex Attribute Format Table (VAT) allows theapplication to specify the format of each attribute for up to eightdifferent vertex formats. The VAT is organized as shown in FIG. 14. Theapplication can store eight predefined vertex formats in the table. Foreach attribute in a vertex, the application can specify the following:

The number of elements for the attribute.

The format and size information.

The number of fractional bits for fixed-point formats using the scaleparameter (the scale parameter is not relevant to color orfloating-point data).

Example Vertex Attribute Format Command (GXSetVtxAttrFmt)

// format index attribute n elements format n frac bits

GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S8, 0);

GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLRO, GX_CLR_RGBA, GX_RGBA8, 0);

The high-level code above defines vertex attribute format zero.GX_VTXFMT0 indicates that “position” is a 3-element coordinate (x, y, z)where each element is an 8-bit 2's complement signed number. The scalevalue indicates the number of fractional bits for a fixed-point number,so zero indicates that the data has no fractional bits. The secondcommand specifies that the GX_VA_CLR0 attribute has four elements (r, g,b, a) where each element is 8 bits. The matrix index format is notspecified in the table because it is always an unsigned 8-bit value. Thescale value is implied for normals (scale=6 or scale=14) and not neededfor colors. Also, normals are assumed to have three elements, Nx, Ny, Nz(for GX_VA_NRM), and nine elements, Nx, Ny, Nz, Bx, By, Bz, Tx, Ty, Tz(for GX_VA_NBT). Normals are generally always signed values. The normalformat (GX_VA_NRM) is also used for binormals/tangents (GX_VA_NBT) whenthey are enabled in the current vertex descriptor. The VAT in theGraphics Processor has room for eight vertex formats. The applicationcan describe most of its attribute quantization formats early in theapplication, loading this table as required. Then the applicationprovides an index into this table, which specifies the vertex attributedata format, when it starts drawing a group of primitives. If theapplication requires more than eight vertex formats it must manage theVAT table by reloading new vertex formats as needed.

FIGS. 13A and 13B show example binary-level commands for controlling thegraphics and audio processor 114 to load an example vertex attributetable (VAT). In the example embodiment, the VAT spins three separateregister loads (VAT_A, VAT_B, VAT_C) so that setting a vertex attributeformat involves writing values to three internal “VAT” registers withinthe graphics and audio processor 114, i.e.:

“0x0870” [4-byte value] to write to the cp_VAT_A register,

“0x0880” [4-byte value] to write to the cp_VAT_B register, and

“0x0890” [4-byte value] to write to the cp_VAT_C register.

As shown in FIG. 13A, the binary bit field encoding for the VAT_Aregister write involves providing position, normal, color 1, color 2,texture 0 coordinate, and other information (i.e., byte dequantizationand normal index bits) in the binary pattern slots shown. Similarly, thebinary bit field encoding for the VAT_B register write involvesproviding formatting information for texture coordinate 1, texturecoordinate 2, texture coordinate 3 and part of texture coordinate 4; andthe information to be stored in the VAT_C register provides attributeformat information for the rest of texture coordinate 4, texturecoordinate 5, texture coordinate 6 and texture coordinate 7. FIGS. 13Aand 13B show the particular bit pattern encodings that may be used.Additional explanation of these particular attributes is set forth inTable V:

TABLE V Bit Attribute Attribute .CompCount .CompSize Shift amount fieldnumber name sub-field(0) sub-field(3:1) sub-field(8:4)  8:0 9 Position0: two (x,y) 0:ubyte 1:byte 2:ushort Location of decimal point 1: three3:short 4:float 5-7 from LSB. This shift applies (x,y,z) reserved to allu/short components and to u/byte components where ByteDequant isasserted (Below). 12:9 10 Normal 0: three 0:reserved 1:byte NA (Byte:6,Short:14) normals 2:reserved 1: nine 3:short 4:float 5-7 normalsreserved 16:13 11 Color0 0: three 0:16 bit 565 (three comp) NA (r,g,b)1:24 bit 888 (three comp) 2:32 bit 888x (three comp) 1: four 3:16 bit4444 (four comp) (r,g,b,a) 4:24 bit 6666 (four comp) 5:32 bit 8888 (fourcomp) 20:17 12 Color1 0: three 0:16 bit 565 (three comp) NA (r,g,b) 1:24bit 888 (three comp) 2:32 bit 888x (three comp) 3:16 bit 4444 (fourcomp) 1: four 4:24 bit 6666 (four comp) (r,g,b,a) 5:32 bit 8888 (fourcomp) 29:21 13 Tex0Coord 0: one (s) 0:ubyte 2:ushort 4:float Location ofdecimal point 1: two (s,t) 1:byte 3:short 5-7 from LSB. This shiftapplies reserved to all u/short components and to u/byte componentswhere ByteDequant is asserted (Below). 38:30 14 Tex1Coord 0: one (s)0:ubyte 2:ushort 4:float Location of decimal point 1: two (s,t) 1:byte3:short 5-7 from LSB. This shift applies reserved to all u/shortcomponents and to u/byte components where ByteDequant is asserted(Below). 47:39 15 Tex2Coord 0: one (s) 0:ubyte 2:ushort 4:float Locationof decimal point 1: two (s,t) 1:byte 3:short 5-7 from LSB. This shiftapplies reserved to all u/short components and to u/byte componentswhere ByteDequant is asserted (Below). 56:48 16 Tex3Coord 0: one (s)0:ubyte 2:ushort 4:float Location of decimal point 1: two (s,t) 1:byte3:short 5-7 from LSB. This shift applies reserved to all u/shortcomponents and to u/byte components where ByteDequant is asserted(Below). 65:57 17 Tex4Coord 0: one (s) 0:ubyte 2:ushort 4:float Locationof decimal point 1: two (s,t) 1:byte 3:short 5-7 from LSB. This shiftapplies reserved to all u/short components and to u/byte componentswhere ByteDequant is asserted (Below). 74:66 18 Tex5Coord 0: one (s)0:ubyte 2:ushort 4:float Location of decimal point 1: two (s,t) 1:byte3:short 5-7 from LSB. This shift applies reserved to all u/shortcomponents and to u/byte components where ByteDequant is asserted(Below). 83:75 19 Tex6Coord 0: one (s) 0:ubyte 2:ushort 4:float Locationof decimal point 1: two (s,t) 1:byte 3:short 5-7 from LSB. This shiftapplies reserved to all u/short components and to u/byte componentswhere ByteDequant is asserted (Below). 92:84 20 Tex7Coord 0: one (s)0:ubyte 2:ushort 4:float Location of decimal point 1: two (s,t) 1:byte3:short 5-7 from LSB. This shift applies reserved to all u/shortcomponents and to u/byte components where ByteDequant is asserted(Below). 93:93 FLAG ByteDequant (Rev B Only) 0:Shift does not apply toShift applies for u/byte u/byte components of position and 1:Shift doesapply to texture attributes. u/byte 94:94 FLAG NormalIndex3 (Rev B Only)0:Single index per Normal When nine normals selected 1:Triple index pernine- in indirect mode, input will Normal be treated as three staggeredindices (one per triple biased by component size), into normal table.NOTE!! First index internally biased by 0. Second index internallybiased by 1. Third index internally biassed by 2.

Defining and Drawing Graphics Primitives

FIG. 15 illustrates some of the different types of primitives supportedby the graphics system 50, including:

GX_POINTS—draws a point at each of the n vertices.

GX_LINES—draws a series of unconnected line segments. Segments are drawnbetween v0 and v1, v2 and v3, etc. The number of vertices drawn shouldbe a multiple of 2.

GX_LINESTRIP—draws a series of connected lines, from v0 to v1, then fromv1 to v2, and so on. If n vertices are drawn, n-1 lines are drawn.

GX_TRIANGLES—draws a series of triangles (three-sided polygons) usingvertices v, v, v2, then v3, v4, v5, and so on. The number of verticesdrawn should be a multiple of 3 and the minimum number is 3.

GX_TRIANGLSTRIP—draws a series of triangles (three-sided polygons) usingvertices v0, v1, v2, then v1, v3, v2 (note the order), then v2, v3, v4,and so on. The number of vertices must be at least 3.

GX_TRIANGLEFAN—draws a series of triangles (three-sided polygons) usingvertices v0, v1, v2, then v0, v2, v3, and so on. The number of verticesmust be at least 3.

GX_QUADS—draws a series of non-planar quadrilaterals (4-sided polygons)beginning with v0, v1, v2, v3, then v4, v5, v6, v7, and so on. The quadis actually drawn using two triangles, so the four vertices are notrequired to be coplanar. it is noted that the diagonal common edgebetween the two triangles of a quad is oriented as shown in FIG. 11. Theminimum number of vertices is 4.

The application draws primitives by calling vertex functions(GXPosition, GXColor, etc.) between GXBegin/GXEnd pairs. The applicationshould call a vertex function for each attribute it enables usingGXSetVtxDesc( ). Each vertex function has a suffix of the formGXData[n][t], which describes the number (n) and type (t) of elementspassed to the vertex function.

The following case fragment demonstrates how to draw primitives usingvertex functions:

GXBegin(GX_TRIANGLES, GX_VTXFMTO, 3);

GXPosition1x8(0); // index to position

GXColor1x16(0); // index to color

GXPosition1x8(1);

GXColor1x16(1);

GXPosition1x8(2);

GXColor1x16(2);

GXEnd( );

GXBegin specifies the type of primitive, an index into the VAT, and thenumber of vertices between the GXBegin/GXEnd pair. This information,along with the latest call to GXSetVtxDesco, fully describes theprimitive, vertex, and attribute format. GXEnd( ) is actually a nullmacro that can be used to make sure that GXBegin and GXEnd are pairedproperly.

Loading a Projection Matrix

FIG. 16 shows an example binary bit stream used to load a projectionmatrix into transform unit 300 (see FIG. 8, block 1004). As describedabove in connection with FIG. 8, the application generally defines aprojection matrix in order to transform a primitive from one space intoanother space (e.g., object space to world space). The transform unit300 automatically transforms the vertices in the primitive using thisprojection matrix.

FIG. 16 shows an example binary bit stream that can be used to load aprojection matrix into transform unit 300. In the example embodiment,this loading process involves sending a binary bit pattern of “0x10” tothe graphics and audio processor 114 indicating “cp_cmd_xf_loadregs”followed by a 4-byte value. In this 4-byte value, the first eleven bitsare 0 padding and the succeeding bits indicate a register address withinthe transform unit 300 (bits 0-15) and the number of 32-bit registerswithin the transform unit to be loaded (bits 16-19). Following these bitpatterns are a sequence of from one to sixteen 32-bit words specifyingprojection matrix values.

In the example embodiment, every register in the transform unit 300 ismapped to a unique 32b address. All addresses are available to the xformregister load command (command 0x30). The first block is formed by thematrix memory. Its address range is 0 to 1 k, but only 256 entries areused. This memory is organized in a 64 entry by four 32b words. Eachword has a unique address and is a single precision floating pointnumber. For block writes, the addresses auto increment. The memory isimplemented in less than 4-32b rams, then it is possible that the memorywrites to this block will require a minimum write size larger than 1word:

Register Address Definition Configuration 0x0000 Matrix Ram word 0 32bmatrix data 0x0001-0x00ff Matrix Ram word (n) 32b matrix data0x0100-0x03ff Not used

The second block of memory is mapped to the k ˜1.5 k range. This memoryis the normal matrix memory. It is organized as 32 rows of 3 words. Eachword has a unique address and is a single precision floating pointnumber. Also, each word written is 32b, but only the 20 most significantbits are kept. For simplicity, the minimum granularity of writes will be3 words:

Register Address Definition Configuration 0x0400-0x402 Normal Ram words0,1,2 20b data 0x0403-0x045f Normal Ram word (n) 20b data 0x0460-0x05ffNot used

The third block of memory holds the dual texture transform matrices. Theformat is identical to the first block of matrix memory. There are also64 rows of 4 words for these matrices. These matrices can only be usedfor the dual transform of regular textures:

Register Address Definition Configuration 0x0500 Matrix Ram word 0 32bmatrix data 0x0501-0x05ff Matrix Ram word (n) 32b matrix data

The fourth block of memory is the light memory. This holds all thelighting information (light vectors, light parameters, etc.). Bothglobal state and ambient state are stored in this memory. Each wordwritten is 32b, but only the 20 most significant bits are kept. Each rowis 3 words wide. Minimum word write size is 3 words.

Example Call Display List Command

As described in the above-referenced patent application Ser. No.09/726,215, filed Nov. 28, 2000 entitled “Method and Apparatus forBuffering Graphics Data in a Graphics System, ” system 50 includes acapability for calling a display list. FIG. 17 shows an example binarybit stream format used to call a display object such as a display list.In the example shown, the binary bit pattern format includes an initial“0x40” indicating “CP_CMD_CALLOBJECT”, followed by a 4-byte address ofthe display list in memory as well as a 4-byte count or size of thedisplay list. The 4-byte address field may include an initial seven bitsof 0 padding followed by a 25-bit value. The 4-byte count value mayinclude an initial seven bits of padding followed by a 25-bit countvalue indicating the count or size of the display list in 32-bytechunks.

Other Example Compatible Implementations

Certain of the above-described system components 50 could be implementedas other than the home video game console configuration described above.For example, one could run graphics application or other softwarewritten for system 50 on a platform with a different configuration thatemulates system 50 or is otherwise compatible with it. If the otherplatform can successfully emulate, simulate and/or provide some or allof the hardware and software resources of system 50, then the otherplatform will be able to successfully execute the software.

As one example, an emulator may provide a hardware and/or softwareconfiguration (platform) that is different from the hardware and/orsoftware configuration (platform) of system 50. The emulator systemmight include software and/or hardware components that emulate orsimulate some or all of hardware and/or software components of thesystem for which the application software was written. For example, theemulator system could comprise a general purpose digital computer suchas a personal computer, which executes a software emulator program thatsimulates the hardware and/or firmware of system 50.

Some general purpose digital computers (e.g., IBM or MacIntosh personalcomputers and compatibles) are now equipped with 3D graphics cards thatprovide 3D graphics pipelines compliant with DirectX or other standard3D graphics command APIs. They may also be equipped with stereophonicsound cards that provide high quality stereophonic sound based on astandard set of sound commands. Such multimedia-hardware-equippedpersonal computers running emulator software may have sufficientperformance to approximate the graphics and sound performance of system50. Emulator software controls the hardware resources on the personalcomputer platform to simulate the processing, 3D graphics, sound,peripheral and other capabilities of the home video game consoleplatform for which the game programmer wrote the game software.

FIG. 18A illustrates an example overall emulation process using a hostplatform 1201, an emulator component 1303, and a game softwareexecutable binary image provided on a storage medium 62. Host 1201 maybe a general or special purpose digital computing device such as, forexample, a personal computer, a video game console, or any otherplatform with sufficient computing power. Emulator 1303 may be softwareand/or hardware that runs on host platform 1201, and provides areal-time conversion of commands, data and other information fromstorage medium 62 into a form that can be processed by host 1201. Forexample, emulator 1303 fetches “source” binary-image programinstructions intended for execution by system 50from storage medium 62and converts these program instructions to a target format that can beexecuted or otherwise processed by host 1201.

As one example, in the case where the software is written for executionon a platform using an IBM PowerPC or other specific processor and thehost 1201 is a personal computer using a different (e.g., Intel)processor, emulator 1203 fetches one or a sequence of binary-imageprogram instructions from storage medium 1305 and converts these programinstructions to one or more equivalent Intel binary-image programinstructions. The emulator 1203 also fetches and/or generates graphicscommands and audio commands intended for processing by the graphics andaudio processor 114, and converts these commands into a format orformats that can be processed by hardware and/or software graphics andaudio processing resources available on host 1201. As one example,emulator 1303 may convert these commands into commands that can beprocessed by specific graphics and/or or sound hardware of the host 1201(e.g., using standard DirectX, OpenGL and/or sound APIs).

An emulator 1303 used to provide some or all of the features of thevideo game system described above may also be provided with a graphicuser interface (GUI) that simplifies or automates the selection ofvarious options and screen modes for games run using the emulator. Inone example, such an emulator 1303 may further include enhancedfunctionality as compared with the host platform for which the softwarewas originally intended.

FIG. 18B illustrates an emulation host system 1201 suitable for use withemulator 1303. System 1201 includes a processing unit 1203 and a systemmemory 1205. A system bus 1207 couples various system componentsincluding system memory 1205 to processing unit 1203. System bus 1207may be any of several types of bus structures including a memory bus ormemory controller, a peripheral bus, and a local bus using any of avariety of bus architectures. System memory 1207 includes read onlymemory (ROM) 1252 and random access memory (RAM) 1254. A basicinput/output system (BIOS) 1256, containing the basic routines that helpto transfer information between elements within personal computer system1201, such as during start-up, is stored in the ROM 1252. System 1201further includes various drives and associated computer-readable media.A hard disk drive 1209 reads from and writes to a (typically fixed)magnetic hard disk 1211. An additional (possible optional) magnetic diskdrive 1213 reads from and writes to a removable “floppy” or othermagnetic disk 1215. An optical disk drive 1217 reads from and, in someconfigurations, writes to a removable optical disk 1219 such as a CD ROMor other optical media. Hard disk drive 1209 and optical disk drive 1217are connected to system bus 1207 by a hard disk drive interface 1221 andan optical drive interface 1225, respectively. The drives and theirassociated computer-readable media provide nonvolatile storage ofcomputer-readable instructions, data structures, program modules, gameprograms and other data for personal computer system 1201. In otherconfigurations, other types of computer-readable media that can storedata that is accessible by a computer (e.g., magnetic cassettes, flashmemory cards, digital video disks, Bernoulli cartridges, random accessmemories (RAMs), read only memories (ROMs) and the like) may also beused.

A number of program modules including emulator 1303 may be stored on thehard disk 1211, removable magnetic disk 1215, optical disk 1219 and/orthe ROM 1252 and/or the RAM 1254 of system memory 1205. Such programmodules may include an operating system providing graphics and soundAPIs, one or more application programs, other program modules, programdata and game data. A user may enter commands and information intopersonal computer system 1201 through input devices such as a keyboard1227, pointing device 1229, microphones, joysticks, game controllers,satellite dishes, scanners, or the like. These and other input devicescan be connected to processing unit 1203 through a serial port interface1231 that is coupled to system bus 1207, but may be connected by otherinterfaces, such as a parallel port, game port Fire wire bus or auniversal serial bus (USB). A monitor 1233 or other type of displaydevice is also connected to system bus 1207 via an interface, such as avideo adapter 1235.

System 1201 may also include a modem 1154 or other network interfacemeans for establishing communications over a network 1152 such as theInternet. Modem 1154, which may be internal or external, is connected tosystem bus 123 via serial port interface 1231. A network interface 1156may also be provided for allowing system 1201 to communicate with aremote computing device 1150 (e.g., another system 1201) via a localarea network 1158 (or such communication may be via wide area network1152 or other communications path such as dial-up or othercommunications means). System 1201 will typically include otherperipheral output devices, such as printers and other standardperipheral devices.

In one example, video adapter 1235 may include a 3D graphics pipelinechip set providing fast 3D graphics rendering in response to 3D graphicscommands issued based on a standard 3D graphics application programmerinterface such as Microsoft's DirectX 7.0 or other version. A set ofstereo loudspeakers 1237 is also connected to system bus 1207 via asound generating interface such as a conventional “sound cards providinghardware and embedded software support for generating high qualitystereophonic sound based on sound commands provided by bus 1207. Thesehardware capabilities allow system 1201 to provide sufficient graphicsand sound speed performance to play software stored in storage medium1305.

Example Higher-Level API Cells

The following show example higher level API cells that a libraryinterprets and/or computes to create the binary level command streamsdescribed above:

GXSetCopyClear

Argument: GXColor ClearColor; //Color value to clear the framebuffer toduring copy. u32 ClearZ: //24 bit Z value to clear the framebuffer toduring copy.

This sets the two clear values used for clearing the framebuffer duringcopy operations.

GXSetVtxDesc

Arguments: GXAttr Attr; //Which attribute (Position, Normal, Color,etc.) GXAttrType Type; //Attribute Type (None, Direct, Indexed, etc.)

This function is used for setting the type of a single attribute in thecurrent vertex descriptor (i.e., vertex attribute register). The vertexattribute register defines which attributes are present in a vertex andhow each attribute is referenced.

GXSetVtxAttrFmt

Argument: GXVtxFmt vtxfmt; //Index into the Vertex Attribute Table(0-7). GXAttr Attr; //Attribute Type. GXCompCnt CompCnt; //Number ofcomponents for the attribute. GXCompType CompType //Type of eachComponent. u8 Shift; //Location of decimal point for fixed point formattypes.

This function sets the attribute format for a single attribute in thevertex attribute format table (VAT). There are 8 vertex formats in theVAT vertex attribute array. Each register describes the data type andcomponent types of all attributes that can be used in a vertex packet.The application can pre-program all 8 registers and then select one ofthem during actual drawing of the geometry.

GXSetArray

Arguments: GXAttr Attr; //Attribute type. u32 Base; //Address (25:0) ofthe attribute data array in main memory. u8 Stride; //Number of bytesbetween successive elements in the attribute array.

This function sets the address and stride of the data array in mainmemory for each indexed attribute. The system uses these arrays to getactual data when an indexed attribute is sent with a vertex packet.

GXSetProjection

Arguments: f32 Matrix[4][4] //Projection matrix. GXProjMtxType type;//Indicates if the projection is orthographic.

Sets projection matrix parameters. The projection matrix is specified asfollows:${{Perspective}\quad {Projection}{\text{:}\quad\begin{bmatrix}X \\Y \\Z \\W\end{bmatrix}}} = {\begin{bmatrix}{p0} & 0 & {p1} & 0 \\0 & {p2} & {p3} & 0 \\0 & 0 & {p4} & {p5} \\0 & 0 & {- 1} & 0\end{bmatrix}\begin{bmatrix}{Xe} \\{Ye} \\{Ze} \\1\end{bmatrix}}$

${{Orthographic}\quad {Projection}{\text{:}\quad\begin{bmatrix}X \\Y \\Z \\W\end{bmatrix}}} = {\begin{bmatrix}{p0} & 0 & 0 & {p1} \\0 & {p2} & 0 & {p3} \\0 & 0 & {p4} & {p5} \\0 & 0 & 0 & 1\end{bmatrix}\begin{bmatrix}{Xe} \\{Ye} \\{Ze} \\1\end{bmatrix}}$

All documents referred to herein are expressly incorporated by referenceas if espressly set forth.

As used herein, the notation “0x” indicates a hexadecimal value. Forexample, “0x61” indicates a hexadecimal value. For example, “0x61”indicates a two-byte hexadecimal value of “61—” which people of ordinaryskill in the art understand has a binary format of 01 100001”. See TableVI below for conversion of hexadecimal notation to binary notation:

TABLE VI Hex Binary 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 70111 8 1000 9 1001 A 1010 B 1011 C 1100 D 1101 E 1110 F 1111

While the invention has been described in connection with what ispresently considered to be the most practical and preferred embodiment,it is to be understood that the invention is not to be limited to thedisclosed embodiment, but on the contrary, is intended to cover variousmodifications and equivalent arrangements included within the scope ofthe appended claims.

We claim:
 1. A graphics command stream for use in a graphics system, thecommand stream being operable upon execution to load vertex attributeregisters, the graphics command stream comprising: a graphics command0x0880 followed by a 4-byte value including attribute information for atexture 1 coordinate, a texture 2 coordinate, a texture 3 coordinate anda first portion of a texture 4 coordinate, and a graphics command 0x0890followed by a 4-byte value including attribute information for a secondportion of the texture 4 coordinate, a texture 5 coordinate, a texture 6coordinate and a texture 7 coordinate, wherein upon execution of thegraphics command stream the vertex attribute registers are loaded.
 2. Acomputer readable storage medium encoded with executable instructionsfor loading vertex attribute registers, comprising: a graphics command0x0880 followed by a 4-byte value including attribute information for atexture 1 coordinate, a texture 2 coordinate, a texture 3 coordinate anda first portion of a texture 4 coordinate, and a graphics command 0x0890followed by a 4-byte value including attribute information for a secondportion of the texture 4 coordinate, a texture 5 coordinate, a texture 6coordinate and a texture 7 coordinate, wherein execution of the encodedinstructions loads the vertex attribute registers.
 3. A graphics commandstream decoder comprising: a first decoding section decoding a graphicscommand 0x0880 followed by a 4-byte value including attributeinformation for a texture 1 coordinate, a texture 2 coordinate, atexture 3 coordinate and a first portion of a texture 4 coordinate, anda second decoding section decoding a graphics command 0x0890 followed bya 4-byte value including attribute information for a second portion ofthe texture 4 coordinate, a texture 5 coordinate, a texture 6 coordinateand a texture 7 coordinate.
 4. A method of loading a vertex attributeregisters in a graphics system using a graphics command stream, themethod comprising: generating a graphics command 0x0880 followed by a4-byte value including attribute information for a texture 1 coordinate,a texture 2 coordinate, a texture 3 coordinate and a first portion of atexture 4 coordinate, and generating a graphics command 0x0890 followedby a 4-byte value including attribute information for a second portionof the texture 4 coordinate, a texture 5 coordinate, a texture 6coordinate and a texture 7 coordinate, wherein upon execution of thegraphics command stream the vertex attribute registers are loaded.